Skip to content

bpo-36688: Adding an implementation of RLock in _dummy_thread#12943

Merged
vstinner merged 3 commits intopython:masterfrom
vlabakje:36688_dummy_thread_RLock
Jun 17, 2019
Merged

bpo-36688: Adding an implementation of RLock in _dummy_thread#12943
vstinner merged 3 commits intopython:masterfrom
vlabakje:36688_dummy_thread_RLock

Conversation

@vlabakje
Copy link
Contributor

@vlabakje vlabakje commented Apr 24, 2019

Implementing an extremely simple RLock that extends Lock. It accepts multiple acquire() calls and just as many release() calls but no more. This should be sufficient for the _dummy_thread module and fixes issue 36688 where python -c 'import dummy_threading' would cause an ImportError.
I also added tests for RLock in Lib/test/test_dummy_thread and made it executable.

https://bugs.python.org/issue36688

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for your contribution, we look forward to reviewing it!

Copy link

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably a new entry needed?

Copy link
Contributor

@skoslowski skoslowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. I ran your tests and double-checked with the documentation

@miss-islington
Copy link
Contributor

Thanks @vlabakje for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @vlabakje for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 17, 2019
…GH-12943)

(cherry picked from commit c5905f3)

Co-authored-by: Joost Lek <vlabakje@gmail.com>
@bedevere-bot
Copy link

GH-14144 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 17, 2019
…GH-12943)

(cherry picked from commit c5905f3)

Co-authored-by: Joost Lek <vlabakje@gmail.com>
@bedevere-bot
Copy link

GH-14145 is a backport of this pull request to the 3.8 branch.

miss-islington added a commit that referenced this pull request Jun 17, 2019
(cherry picked from commit c5905f3)

Co-authored-by: Joost Lek <vlabakje@gmail.com>
miss-islington added a commit that referenced this pull request Jun 17, 2019
(cherry picked from commit c5905f3)

Co-authored-by: Joost Lek <vlabakje@gmail.com>
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants